// 工具库
import { ElMessage } from 'element-plus'

export function alertMsg(message, type, duration=1000) {
    if(duration==1000){
        if(type == 'error') duration = 3000;
        else if(type == 'warning') duration = 2000;
    }
    ElMessage({
        message,
        type,
        duration,
    });
}


// 暴露函数
export default {
    alertMsg,
}